package com.haoxi.gateway.cmpp30msg;

/**
 * Title:CMPP3.0,200409
 * */

import java.io.IOException;
import java.io.OutputStream;


/**
 * ����ActiveTestRep��Ϣ���ƶ����,ʵ��CMPP3.0 CMPP_Active_Test_REP
 */
public class CMPPActiveTestRep {
    /**
     * �����ֽ�
     */
    private byte[] outbytes = null;

    /**
     * ����һ��CMPP_ACTIVE_TEST_REP��
     *
     * @param SequenceID ��Ϣ���
     */
    public CMPPActiveTestRep ( int SequenceID ) {
        outbytes = new byte[CMPPCommon.MSG_HEAD_LENGTH + CMPPCommon.MSG_ACTIVETEST_REP_BODY_LENGTH];
        CMPPMsgHead head = new CMPPMsgHead ( outbytes.length, CMPPCommon.CMPP_ACTIVE_TEST_REP, SequenceID );
        CMPPCommon.BytesCopy ( head.getMsgHead (), outbytes, 0, CMPPCommon.MSG_HEAD_LENGTH - 1, 0 );
    }

    /**
     * ��ActiveTestRep��Ϣд���ƶ����
     *
     * @param out �����
     * @throws ��output Stream����Υ��
     */
    public void write ( OutputStream out ) throws IOException {
        out.write ( outbytes );
        out.flush ();
    }
}